<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Logagent: src/logagent-log.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Logagent
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">logagent-log.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="logagent-log_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2018 Steven Lee &lt;geekerlw@gmail.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#ifndef __LOGAGENT_LOG_H__</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#define __LOGAGENT_LOG_H__</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0">   18</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0">ENUM_LOG_LEVEL</a> {</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a538b2b6e011479d408ecd2be0f6d6177">   19</a></span>&#160;    <a class="code" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a>,</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0aedee1e3159bfe7d918b6e29873c5aee4">   20</a></span>&#160;    <a class="code" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a>,</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a99c1e5c8e6d557f3993b9ab54a0107f4">   21</a></span>&#160;    <a class="code" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a99c1e5c8e6d557f3993b9ab54a0107f4">LOG_LEVEL_WARN</a>,</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a5b40f003febbc3b535649d63f4b8a44f">   22</a></span>&#160;    <a class="code" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a>,</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a779dc8dd26898fb0f88cd5f6e02ba1e5">   23</a></span>&#160;    <a class="code" href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a779dc8dd26898fb0f88cd5f6e02ba1e5">LOG_LEVEL_FATAL</a></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;};</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#a5cc1ee99bd6a22cf8f0462c3e027b29b">   26</a></span>&#160;<span class="preprocessor">#define LOGAGENT_LOG_DEBUG(x, ...)  logagent_log_write(LOG_LEVEL_DEBUG, __FUNCTION__, x, __VA_ARGS__)</span></div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#ad7e0a256a5ec3cc192661eb72e6b5b35">   27</a></span>&#160;<span class="preprocessor">#define LOGAGENT_LOG_INFO(x, ...)   logagent_log_write(LOG_LEVEL_INFO, __FUNCTION__, x, __VA_ARGS__)</span></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#ae4d65d5af9f43912f231be1268767422">   28</a></span>&#160;<span class="preprocessor">#define LOGAGENT_LOG_WARN(x, ...)   logagent_log_write(LOG_LEVEL_WARN, __FUNCTION__, x, __VA_ARGS__)</span></div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#a7fe88bb4b56d14647a65284517b4fe55">   29</a></span>&#160;<span class="preprocessor">#define LOGAGENT_LOG_ERROR(x, ...)  logagent_log_write(LOG_LEVEL_ERROR, __FUNCTION__, x, __VA_ARGS__)</span></div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="logagent-log_8h.html#a4578a6c070b24c4343cfada7eab71e4d">   30</a></span>&#160;<span class="preprocessor">#define LOGAGENT_LOG_FATAL(x, ...)  logagent_log_write(LOG_LEVEL_FATAL, __FUNCTION__, x, __VA_ARGS__)</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keywordtype">void</span> <a class="code" href="logagent-log_8h.html#ad9086bf07a151cb69dc3ad145a51febe">logagent_log_write</a>(<span class="keywordtype">int</span> level, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">function</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *format,</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            ...);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="logagent-log_8h_html_afe31f2e1c51532a8c2ebfcebb349cab0a779dc8dd26898fb0f88cd5f6e02ba1e5"><div class="ttname"><a href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a779dc8dd26898fb0f88cd5f6e02ba1e5">LOG_LEVEL_FATAL</a></div><div class="ttdef"><b>Definition:</b> logagent-log.h:23</div></div>
<div class="ttc" id="logagent-log_8h_html_afe31f2e1c51532a8c2ebfcebb349cab0a538b2b6e011479d408ecd2be0f6d6177"><div class="ttname"><a href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a538b2b6e011479d408ecd2be0f6d6177">LOG_LEVEL_DEBUG</a></div><div class="ttdef"><b>Definition:</b> logagent-log.h:19</div></div>
<div class="ttc" id="logagent-log_8h_html_afe31f2e1c51532a8c2ebfcebb349cab0a5b40f003febbc3b535649d63f4b8a44f"><div class="ttname"><a href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a5b40f003febbc3b535649d63f4b8a44f">LOG_LEVEL_ERROR</a></div><div class="ttdef"><b>Definition:</b> logagent-log.h:22</div></div>
<div class="ttc" id="logagent-log_8h_html_ad9086bf07a151cb69dc3ad145a51febe"><div class="ttname"><a href="logagent-log_8h.html#ad9086bf07a151cb69dc3ad145a51febe">logagent_log_write</a></div><div class="ttdeci">void logagent_log_write(int level, const char *function, const char *format,...)</div></div>
<div class="ttc" id="logagent-log_8h_html_afe31f2e1c51532a8c2ebfcebb349cab0aedee1e3159bfe7d918b6e29873c5aee4"><div class="ttname"><a href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0aedee1e3159bfe7d918b6e29873c5aee4">LOG_LEVEL_INFO</a></div><div class="ttdef"><b>Definition:</b> logagent-log.h:20</div></div>
<div class="ttc" id="logagent-log_8h_html_afe31f2e1c51532a8c2ebfcebb349cab0"><div class="ttname"><a href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0">ENUM_LOG_LEVEL</a></div><div class="ttdeci">ENUM_LOG_LEVEL</div><div class="ttdef"><b>Definition:</b> logagent-log.h:18</div></div>
<div class="ttc" id="logagent-log_8h_html_afe31f2e1c51532a8c2ebfcebb349cab0a99c1e5c8e6d557f3993b9ab54a0107f4"><div class="ttname"><a href="logagent-log_8h.html#afe31f2e1c51532a8c2ebfcebb349cab0a99c1e5c8e6d557f3993b9ab54a0107f4">LOG_LEVEL_WARN</a></div><div class="ttdef"><b>Definition:</b> logagent-log.h:21</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
